package edu.scau.misp.backend_module.mapper;

import edu.scau.misp.backend_module.domain.Addition;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface AdditionMapper {
    /**
     *根据Sn得到Addition对象
     * @param additionSn
     * @return
     */

    public Addition getAdditionBySn(Long additionSn);

    public Addition getAdditionById(Long additionId);

    /**
     * 查询所有的附加内容
     * @return
     */

    public List<Addition> listAllAddition();

    /**
     *添加附加内容
     * @param addition
     * @return
     */
    int insertAddition(Addition addition);

    /**
     *修改附加内容
     * @param addition
     * @return
     */
    int updateAddition(Addition addition);

    /**
     *删除附加内容
     * @param additionId 主键
     * @return
     */
    int deleteAdditionById(Long additionId);

    /**
     * 查询附加内容列表
     * @param addition 查询参数
     * @return
     */
    List<Addition> selectAdditionList(Addition addition);
}
